package conf

import (
	"encoding/json"
	"io/ioutil"
)

const CONTENT_TYPE = "application/json;charset=utf8"

var Config *Conf

type Conf struct {
	WxAppId          string `json:"wx_app_id"`
	WxAppSecret      string `json:"wx_app_secret"`
	WxTemplateId     string `json:"wx_template_id"`
	WeatherCity      string `json:"weather_city"`
	WeatherAppId     string `json:"weather_app_id"`
	WeatherAppSecret string `json:"weather_app_secret"`
	HttpServerPort   string `json:"http_server_port"`
}

func init() {
	data, _ := ioutil.ReadFile("config.json")
	var tmp Conf
	_ = json.Unmarshal(data, &tmp)

	Config = &tmp
}
